package eu.codlab.eirb.caslibrary;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class TwittEirbAuthenticationService extends Service{
	private TwittEirbAuthenticator sAccountAuthenticator;

	@Override
	public IBinder onBind(Intent intent){
		IBinder ret = null;
		if (intent.getAction().equals(android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT)){
			ret = getAuthenticator().getIBinder();
		}
		return ret;
	}

	public TwittEirbAuthenticator getAuthenticator(){
		if (sAccountAuthenticator == null){
			sAccountAuthenticator = new TwittEirbAuthenticator(this);
		}
		return sAccountAuthenticator;
	}


}